package com.fm.magic.net.chrome;

/**
 * @author leo.li
 */
public class SocketInfo {
    private String description;
    private String devtoolsFrontendUrl;
    private String id;
    private String title;
    private String type;
    private String url;
    private String webSocketDebuggerUrl;

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getDevtoolsFrontendUrl() {
        return devtoolsFrontendUrl;
    }

    public void setDevtoolsFrontendUrl(String devtoolsFrontendUrl) {
        this.devtoolsFrontendUrl = devtoolsFrontendUrl;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getWebSocketDebuggerUrl() {
        return webSocketDebuggerUrl;
    }

    public void setWebSocketDebuggerUrl(String webSocketDebuggerUrl) {
        this.webSocketDebuggerUrl = webSocketDebuggerUrl;
    }

    @Override
    public boolean equals(Object o) {
        return this == o || o instanceof SocketInfo && id.equals(((SocketInfo) o).id);
    }

    @Override
    public int hashCode() {
        int result = description != null ? description.hashCode() : 0;
        result = 31 * result + devtoolsFrontendUrl.hashCode();
        result = 31 * result + id.hashCode();
        result = 31 * result + (title != null ? title.hashCode() : 0);
        result = 31 * result + (type != null ? type.hashCode() : 0);
        result = 31 * result + (url != null ? url.hashCode() : 0);
        result = 31 * result + webSocketDebuggerUrl.hashCode();
        return result;
    }
}
